/**
 * 
 */
package org.xlab.baseframework.conf;

import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.xlab.baseframework.event.SystemCodeChangedEvent;
import org.xlab.baseframework.event.SystemCodeRemovedEvent;
import org.xlab.baseframework.event.SystemParameterChangedEvent;
import org.xlab.baseframework.event.SystemParameterRemovedEvent;
import org.xlab.baseframework.listener.LogTypeGenerater;
import org.xlab.baseframework.listener.SystemCodeChangedListener;
import org.xlab.baseframework.listener.SystemCodeLoader;
import org.xlab.baseframework.listener.SystemCodeRemovedListener;
import org.xlab.baseframework.listener.SystemParameterChangedListener;
import org.xlab.baseframework.listener.SystemParameterGenerater;
import org.xlab.baseframework.listener.SystemParameterLoader;
import org.xlab.baseframework.listener.SystemParameterRemovedListener;
import org.xlab.baseframework.service.spi.ISystemInitializationListener;

/**
 * @author MaKuBEX
 * 
 */
@Configuration
public class ListenerConfigration {
	@Bean(autowire = Autowire.BY_NAME, name = "bpf_logTypeGenerater")
	public ISystemInitializationListener logTypeGenerater() {
		return new LogTypeGenerater();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_systemCodeChangedListener")
	public ApplicationListener<SystemCodeChangedEvent> systemCodeChangedListener() {
		return new SystemCodeChangedListener();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_systemCodeLoader")
	public ISystemInitializationListener systemCodeLoader() {
		return new SystemCodeLoader();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_systemCodeRemovedListener")
	public ApplicationListener<SystemCodeRemovedEvent> systemCodeRemovedListener() {
		return new SystemCodeRemovedListener();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_systemParameterChangedListener")
	public ApplicationListener<SystemParameterChangedEvent> systemParameterChangedListener() {
		return new SystemParameterChangedListener();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_parameterGenerater")
	public ISystemInitializationListener systemParameterGenerater() {
		return new SystemParameterGenerater();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_systemParameterLoader")
	public ISystemInitializationListener systemParameterLoader() {
		return new SystemParameterLoader();
	}

	@Bean(autowire = Autowire.BY_NAME, name = "bpf_systemParameterRemovedListener")
	public ApplicationListener<SystemParameterRemovedEvent> systemParameterRemovedListener() {
		return new SystemParameterRemovedListener();
	}
}
